<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="java.util.Enumeration,java.util.Objects" %>
<!DOCTYPE html>
<html>
<head>
<title>隐含对象session</title>
</head>
<body>
  session是实现HttpSession接口的实例<br>
  <%="遍历session的所有属性的值<br>"%>
  <%
      Enumeration<String> names = session.getAttributeNames();
      while (names.hasMoreElements()) {
          String name = names.nextElement();
          Object value = session.getAttribute(name);
          if (Objects.nonNull(value)) {
              out.print(value + "<br>");
          }
      }
  %>
</body>
</html>
